#ifndef MATH_H
#define MATH_H

template <class T>
T Clamp(T val, T min, T max)
{
	if (val < min)
		val = min;
	if (val > max)
		val = max;

	return val;
}

template <class T>
T Lerp(T from, T to, float speed)
{
	speed = Clamp(speed, 0.0f, 1.0f);

	T lerpPoint = from + (to - from) * speed;
	return lerpPoint;
}



#endif // MATH_H